import logging
import pytest
from python.utils.logger import app_logger

@pytest.fixture(scope='session')
def logger():
    logger = app_logger
    logger.logger.setLevel(logging.DEBUG)
    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    console_handler = logging.StreamHandler()
    console_handler.setLevel(logging.DEBUG)
    console_handler.setFormatter(formatter)
    logger.logger.addHandler(console_handler)
    return logger